400
|
Can I change the format of date to be shown in the control

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn,oColumn1,oColumn2
LOCAL oColumns
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumns := oList:Columns()
oColumns:Add("Default")
oColumn := oColumns:Add("Format.1")
oColumn:ComputedField := "%0"
oColumn:FormatColumn := "dateF(value) replace `/` with `-`"
oColumn1 := oColumns:Add("Format.2")
oColumn1:ComputedField := "%0"
oColumn1:SetProperty("Def",17/*exCaptionFormat*/,1)
oColumn1:FormatColumn := "`<b>`+ shortdate(value) + `</b> ` + timeF(value)"
oColumn2 := oColumns:Add("Format.3")
oColumn2:ComputedField := "%0"
oColumn2:SetProperty("Def",17/*exCaptionFormat*/,1)
oColumn2:FormatColumn := "( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `Fr`; 6 : `Sa`) )"
oItems := oList:Items()
oItems:Add("01/01/2001 10:00:00")
oItems:Add("01/02/2001 10:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
399
|
How can I put a picture on the cell's background (method 3)

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL i
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oList:VisualAppearance():Add(2,"CP:1 0 0 -164 0")
oColumns := oList:Columns()
oColumns:Add("column")
oColumn := oColumns:Add("column")
oColumn:Alignment := 1/*CenterAlignment*/
oColumn:HeaderAlignment := 1/*CenterAlignment*/
oItems := oList:Items()
i := oItems:Add()
oItems:SetProperty("SelectableItem",i,.F.)
oItems:SetProperty("Caption",i,1,"caption")
oItems:SetProperty("CellBackColor",i,1,0x2000000)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
398
|
How can I put a picture on the cell's background (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL i
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oColumns := oList:Columns()
oColumns:Add("column")
oColumns:Add("column")
oItems := oList:Items()
i := oItems:Add()
oItems:SetProperty("SelectableItem",i,.F.)
oItems:SetProperty("Caption",i,1,"caption")
oItems:SetProperty("CellBackColor",i,1,0x1000000)
oItems:SetProperty("CellPicture",i,1,oList:ExecuteTemplate("loadpicture(`c:\exontrol\images\auction.gif`)"))
oItems:SetProperty("CellPictureWidth",i,1,128)
oItems:SetProperty("CellPictureHeight",i,1,oList:DefaultItemHeight())
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
397
|
How can I put a picture on the cell's background (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL i
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oColumns := oList:Columns()
oColumns:Add("column")
oColumn := oColumns:Add("column")
oColumn:Alignment := 1/*CenterAlignment*/
oColumn:HeaderAlignment := 1/*CenterAlignment*/
oItems := oList:Items()
i := oItems:Add()
oItems:SetProperty("SelectableItem",i,.F.)
oItems:SetProperty("Caption",i,1,"caption")
oItems:SetProperty("CellBackColor",i,1,0x1000000)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
396
|
How do I access the cells, or how do I get the values in the columns

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumns := oList:Columns()
oColumns:Add("C1")
oColumns:Add("C2")
oColumns:Add("C3")
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:SetProperty("Caption",h,1,"SubItem 1.1")
oItems:SetProperty("Caption",h,2,"SubItem 1.2")
DevOut( Transform(oItems:Caption(h,2),"") )
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
395
|
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oConditionalFormat,oConditionalFormat1
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oConditionalFormat := oList:ConditionalFormats():Add("1","K1")
oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oConditionalFormat:ApplyTo := 1/*0x1+*/
oConditionalFormat1 := oList:ConditionalFormats():Add("1","K2")
oConditionalFormat1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oConditionalFormat1:ApplyTo := 2/*0x2+*/
oList:MarkSearchColumn := .F.
oList:DrawGridLines := -2/*0xfffffffc+exVLines*/
oColumns := oList:Columns()
oColumns:Add("Column 1")
oColumns:Add("Column 2")
oColumns:Add("Column 3")
oItems := oList:Items()
oItems:Add()
oItems:Add()
oItems:Add()
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
394
|
How can I get the list of items as they are displayed

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. ))
oList:Columns():Add("Names")
oItems := oList:Items()
oItems:Add("Mantel")
oItems:Add("Mechanik")
oItems:Add("Motor")
oItems:Add("Murks")
oItems:Add("Märchen")
oItems:Add("Möhren")
oItems:Add("Mühle")
oList:Columns:Item(0):SortOrder := 1/*SortAscending*/
oList:EndUpdate()
DevOut( Transform(oList:GetItems(1),"") )
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
393
|
Is posible to reduce the size of the picture to be shown in the column's caption

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
oList:HeaderHeight := 48
oList:Columns():Add("DefaultSize"):HTMLCaption := "Default-Size <img>pic1</img> Picture"
oList:Columns():Add("CustomSize"):HTMLCaption := "Custom-Size <img>pic1:16</img> Picture"
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
392
|
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oConditionalFormat
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:MarkSearchColumn := .F.
oConditionalFormat := oList:ConditionalFormats():Add("1")
oConditionalFormat:Bold := .T.
oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oConditionalFormat:ApplyTo := 1/*0x1+*/
oList:Columns():Add("C1")
oColumn := oList:Columns():Add("C2")
oColumn:HeaderBold := .T.
oColumn:HTMLCaption := "<fgcolor=FF0000>C2"
oItems := oList:Items()
oItems:SetProperty("Caption",oItems:Add(10),1,11)
oItems:SetProperty("Caption",oItems:Add(12),1,13)
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
391
|
Is it possible to limit the height of item while resizing the row

PROCEDURE OnAddItem(oList,Item)
oList:Items():SetProperty("ItemMinHeight",Item,18)
oList:Items():SetProperty("ItemMaxHeight",Item,72)
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:AddItem := {|Item| OnAddItem(oList,Item)} /*Occurs after a new Item is inserted to Items collection.*/
oList:BeginUpdate()
oList:ItemsAllowSizing := -1/*exResizeItem*/
oList:ScrollBySingleLine := .F.
oList:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. ))
oList:Columns():Add("Names")
oItems := oList:Items()
oItems:Add("Mantel")
oItems:Add("Mechanik")
oItems:Add("Motor")
oItems:Add("Murks")
oItems:Add("Märchen")
oItems:Add("Möhren")
oItems:Add("Mühle")
oList:Columns:Item(0):SortOrder := 1/*SortAscending*/
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
390
|
Can I specify un-sortable items so they keep their position once the user sorts the columns

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Def"):SortType := 1/*SortNumeric*/
oItems := oList:Items()
oItems:SetProperty("SortableItem",oItems:Add("Unsortable"),.F.)
oItems:Add(1)
oItems:Add(2)
oItems:Add(3)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
389
|
The item is not getting selected when clicking the cell's checkbox. What should I do

PROCEDURE OnCellStateChanged(oList,ItemIndex,ColIndex)
oList:Items():SetProperty("SelectItem",ItemIndex,.T.)
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:CellStateChanged := {|ItemIndex,ColIndex| OnCellStateChanged(oList,ItemIndex,ColIndex)} /*Fired after cell's state is changed.*/
oList:Columns():Add("Check"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
oItems := oList:Items()
oItems:Add(0)
oItems:Add(1)
oItems:Add(2)
oItems:Add(3)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
388
|
Does your control supports multiple lines tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
oList:ToolTipDelay := 1
oList:Columns():Add("tootip"):ToolTip := "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
387
|
How can I prevent highlighting the column from the cursor - point

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI=")
oList:SetProperty("Background",32/*exCursorHoverColumn*/,0x1000000)
oList:Columns():Add("S"):Width := 32
oList:Columns():Add("Level 1"):LevelKey := 1
oList:Columns():Add("Level 2"):LevelKey := 1
oList:Columns():Add("Level 3"):LevelKey := 1
oList:Columns():Add("E1"):Width := 32
oList:Columns():Add("E2"):Width := 32
oList:Columns():Add("E3"):Width := 32
oList:Columns():Add("E4"):Width := 32
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
386
|
Is there any option to show the tooltip programmatically

PROCEDURE OnMouseMove(oList,Button,Shift,X,Y)
oList:ShowToolTip(Transform(oList:ItemFromPoint(-1,-1,c,hit),""),"","8","8")
RETURN
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oList,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/
oList:BeginUpdate()
oList:Columns():Add("Def")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
385
|
Is it possible to prevent covering the colors by selected rows

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:SelBackMode := 1/*exTransparent*/
oList:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. ))
oList:Columns():Add("Column")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oItems:Add("Item 4")
oItems:Add("Item 5")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
384
|
Can I use PNG images to display pictures in the control

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:SetProperty("HTMLPicture","pic1","c:\exontrol\images\card.png")
oList:HeaderHeight := 48
oList:Columns():Add("ColumnName"):HTMLCaption := "<b>HTML</b> Column <img>pic1</img> Picture"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
383
|
Does your control support conditional format and computed fields

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn,oColumn1,oColumn2,oColumn3
LOCAL oColumns
LOCAL oConditionalFormat,oConditionalFormat1,oConditionalFormat2
LOCAL oConditionalFormats
LOCAL oItems
LOCAL oList
LOCAL h1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:MarkSearchColumn := .F.
oConditionalFormats := oList:ConditionalFormats()
oConditionalFormat := oConditionalFormats:Add("%1 >4")
oConditionalFormat:Bold := .T.
oConditionalFormat:StrikeOut := .T.
oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oConditionalFormat:ApplyTo := 1/*0x1+*/
oConditionalFormat1 := oConditionalFormats:Add("%2 > 4")
oConditionalFormat1:Bold := .T.
oConditionalFormat1:StrikeOut := .T.
oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oConditionalFormat1:ApplyTo := 2/*0x2+*/
oConditionalFormat2 := oConditionalFormats:Add("%3 > 4")
oConditionalFormat2:Bold := .T.
oConditionalFormat2:StrikeOut := .T.
oConditionalFormat2:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oConditionalFormat2:ApplyTo := 3/*0x3+*/
oColumns := oList:Columns()
oColumns:Add("Name")
oColumn := oColumns:Add("A")
oColumn:SortType := 1/*SortNumeric*/
oColumn:AllowSizing := .F.
oColumn:Width := 36
oColumn:FormatColumn := "len(value) ? value + ' +'"
oColumn1 := oColumns:Add("B")
oColumn1:SortType := 1/*SortNumeric*/
oColumn1:AllowSizing := .F.
oColumn1:Width := 36
oColumn1:FormatColumn := "len(value) ? value + ' +'"
oColumn2 := oColumns:Add("C")
oColumn2:SortType := 1/*SortNumeric*/
oColumn2:AllowSizing := .F.
oColumn2:Width := 36
oColumn2:FormatColumn := "len(value) ? value + ' ='"
oColumn3 := oColumns:Add("A+B+C")
oColumn3:SortType := 1/*SortNumeric*/
oColumn3:AllowSizing := .F.
oColumn3:Width := 64
oColumn3:ComputedField := "%1+%2+%3"
oColumn3:FormatColumn := "((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"
oColumn3:SetProperty("Def",17/*exCaptionFormat*/,1)
oItems := oList:Items()
h1 := oItems:Add("Item 1")
oItems:SetProperty("Caption",h1,1,7)
oItems:SetProperty("Caption",h1,2,3)
oItems:SetProperty("Caption",h1,3,1)
h1 := oItems:Add("Item 2")
oItems:SetProperty("Caption",h1,1,2)
oItems:SetProperty("Caption",h1,2,5)
oItems:SetProperty("Caption",h1,3,12)
h1 := oItems:Add("Item 3")
oItems:SetProperty("Caption",h1,1,2)
oItems:SetProperty("Caption",h1,2,2)
oItems:SetProperty("Caption",h1,3,4)
h1 := oItems:Add("Item 4")
oItems:SetProperty("Caption",h1,1,2)
oItems:SetProperty("Caption",h1,2,9)
oItems:SetProperty("Caption",h1,3,4)
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
382
|
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ScrollBars := 15/*DisableBoth*/
oColumns := oList:Columns()
oColumns:Add("C1")
oColumns:Add("C2")
oColumns:Add("C3")
oColumns:Add("C4")
oColumns:Add("C5")
oColumns:Add("C6")
oColumns:Add("C7")
oColumns:Add("C8")
oList:RightToLeft := .T.
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
381
|
Can I display the cell's check box after the text

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumn := oList:Columns():Add("Column")
oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
oColumn:SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check")
oItems := oList:Items()
oItems:SetProperty("CellHasCheckBox",oItems:Add("Caption 1"),0,.T.)
oItems:SetProperty("CellHasCheckBox",oItems:Add("Caption 2"),0,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
380
|
Can I change the order of the parts in the cell, as checkbox after the text, and so on

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList:Columns():Add("Column"):SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check,icon,icons,picture")
oItems := oList:Items()
h := oItems:Add("Text")
oItems:SetProperty("CellImage",h,0,1)
oItems:SetProperty("CellHasCheckBox",h,0,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
379
|
Can I have an image displayed after the text. Can I get that effect without using HTML content

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oList:Columns():Add("Column"):SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,icon,check,icons,picture")
oItems := oList:Items()
h := oItems:Add("Text")
oItems:SetProperty("CellImage",h,0,1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
378
|
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ScrollBars := 15/*DisableBoth*/
oColumns := oList:Columns()
oColumns:Add("C1")
oColumns:Add("C2")
oColumns:Add("C3")
oColumns:Add("C4")
oColumns:Add("C5")
oColumns:Add("C6")
oColumns:Add("C7")
oColumns:Add("C8")
oList:RightToLeft := .T.
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
377
|
How can I change the foreground color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumns := oList:Columns()
oColumns:Add("Column 1")
oColumns:Add("Column 2"):SetProperty("Def",8/*exHeaderForeColor*/,8439039)
oColumns:Add("Column 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
376
|
How can I change the background color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumns := oList:Columns()
oColumns:Add("Column 1")
oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,8439039)
oColumns:Add("Column 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
375
|
How can I display the column using currency format and enlarge the font for certain values

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumn := oList:Columns():Add("Currency")
oColumn:SetProperty("Def",17/*exCaptionFormat*/,1)
oColumn:FormatColumn := "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
oItems := oList:Items()
oItems:Add("1.23")
oItems:Add("2.34")
oItems:Add("9.94")
oItems:Add("11.94")
oItems:Add("1000")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
374
|
How can I highlight only parts of the cells

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumn := oList:Columns():Add("")
oColumn:SetProperty("Def",17/*exCaptionFormat*/,1)
oColumn:FormatColumn := "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
oItems := oList:Items()
h := oItems:Add("Root")
oItems:Add("Child 1")
oItems:Add("Child 2")
oItems:Add("Child 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
373
|
How can I get the number of occurrences of a specified string in the cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("")
oColumn := oList:Columns():Add("occurrences")
oColumn:ComputedField := "lower(%0) count 'o'"
oColumn:FormatColumn := "'contains ' + value + ' of \'o\' chars'"
oItems := oList:Items()
h := oItems:Add("Root")
oItems:Add("Child 1 oooof the root")
oItems:Add("Child 2")
oItems:Add("Child 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
372
|
How can I display dates in my format

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumn := oList:Columns():Add("Date")
oColumn:SetProperty("Def",17/*exCaptionFormat*/,1)
oColumn:FormatColumn := "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
oItems := oList:Items()
oItems:Add("01/21/2001")
oItems:Add("02/22/2002")
oItems:Add("03/13/2003")
oItems:Add("04/24/2004")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
371
|
How can I display dates in short format

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date"):FormatColumn := "shortdate(value)"
oItems := oList:Items()
oItems:Add("01/01/2001")
oItems:Add("02/02/2002")
oItems:Add("03/03/2003")
oItems:Add("04/04/2004")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
370
|
How can I display dates in long format

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date"):FormatColumn := "longdate(value)"
oItems := oList:Items()
oItems:Add("01/01/2001")
oItems:Add("02/02/2002")
oItems:Add("03/03/2003")
oItems:Add("04/04/2004")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
369
|
How can I display only the right part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("")
oColumn := oList:Columns():Add("Right")
oColumn:ComputedField := "%0 right 2"
oColumn:FormatColumn := "'" + CHR(34) + "' + value + '" + CHR(34) + "'"
oItems := oList:Items()
h := oItems:Add("Root")
oItems:Add("Child 1")
oItems:Add("Child 2")
oItems:Add("SChild 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
368
|
How can I display only the left part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("")
oList:Columns():Add("Left"):ComputedField := "%0 left 2"
oItems := oList:Items()
h := oItems:Add("Root")
oItems:Add("Child 1")
oItems:Add("Child 2")
oItems:Add("SChild 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
367
|
How can I display true or false instead 0 and -1

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Boolean"):FormatColumn := "value != 0 ? 'true' : 'false'"
oItems := oList:Items()
oItems:Add(.T.)
oItems:Add(.F.)
oItems:Add(.T.)
oItems:Add(0)
oItems:Add(1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
366
|
How can I display icons or images instead numbers

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oColumn := oList:Columns():Add("Icons")
oColumn:SetProperty("Def",17/*exCaptionFormat*/,1)
oColumn:FormatColumn := "'The cell displays the icon <img>'+value+'</img> instead ' + value"
oItems := oList:Items()
oItems:Add(1)
oItems:Add(2)
oItems:Add(3)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
365
|
How can I display the column using currency

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Currency"):FormatColumn := "currency(dbl(value))"
oItems := oList:Items()
oItems:Add("1.23")
oItems:Add("2.34")
oItems:Add("0")
oItems:Add(5)
oItems:Add("10000.99")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
364
|
Is is possible to use HTML tags to display in the filter caption

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarCaption := "This is a bit of text being displayed in the filter bar."
oList:Columns():Add("")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
363
|
How can I find the number of items after filtering
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:Columns():Add("")
oItems := oList:Items()
h := oItems:Add("")
oItems:SetProperty("Caption",h,0,oItems:VisibleItemCount())
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
362
|
How can I change the filter caption

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 12801/*exFilterPromptWords+exFilterPromptContainsAll*/
oList:FilterBarPromptPattern := "london robert"
oList:FilterBarCaption := "<r>Found: ... "
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
361
|
While using the filter prompt is it is possible to use wild characters

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 16/*exFilterPromptPattern*/
oList:FilterBarPromptPattern := "lon* seat*"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
360
|
How can I list all items that contains any of specified words, not necessary at the beggining

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 4610/*exFilterPromptStartWords+exFilterPromptContainsAny*/
oList:FilterBarPromptPattern := "london davolio"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
359
|
How can I list all items that contains any of specified words, not strings

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 12802/*exFilterPromptWords+exFilterPromptContainsAny*/
oList:FilterBarPromptPattern := "london nancy"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
358
|
How can I list all items that contains all specified words, not strings

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 12801/*exFilterPromptWords+exFilterPromptContainsAll*/
oList:FilterBarPromptPattern := "london robert"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
357
|
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 258/*exFilterPromptCaseSensitive+exFilterPromptContainsAny*/
oList:FilterBarPromptPattern := "Anne"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
356
|
Is it possible to list only items that ends with any of specified strings

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 4/*exFilterPromptEndWith*/
oList:FilterBarPromptColumns := "0"
oList:FilterBarPromptPattern := "Fuller"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
355
|
Is it possible to list only items that ends with any of specified strings

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 4/*exFilterPromptEndWith*/
oList:FilterBarPromptColumns := "0"
oList:FilterBarPromptPattern := "Fuller"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
354
|
Is it possible to list only items that starts with any of specified strings

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 3/*exFilterPromptStartWith*/
oList:FilterBarPromptColumns := "0"
oList:FilterBarPromptPattern := "An M"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
353
|
Is it possible to list only items that starts with specified string

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 3/*exFilterPromptStartWith*/
oList:FilterBarPromptColumns := "0"
oList:FilterBarPromptPattern := "A"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
352
|
How can I specify that the list should include any of the seqeunces in the pattern

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 2/*exFilterPromptContainsAny*/
oList:FilterBarPromptPattern := "london seattle"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
351
|
How can I specify that all sequences in the filter pattern must be included in the list

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptType := 1/*exFilterPromptContainsAll*/
oList:FilterBarPromptPattern := "london manager"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
350
|
How do I change at runtime the filter prompt

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptPattern := "london manager"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
349
|
How do I specify to filter only a single column when using the filter prompt

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPromptColumns := "2,3"
oList:FilterBarPromptPattern := "london"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
348
|
How do I change the prompt or the caption being displayed in the filter bar

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oList:FilterBarPrompt := "changed"
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
347
|
How do I enable the filter prompt feature

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oItems
LOCAL oList
LOCAL h0
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:ColumnAutoResize := .T.
oList:ContinueColumnScroll := .F.
oList:MarkSearchColumn := .F.
oList:SearchColumnIndex := 1
oList:FilterBarPromptVisible := -1/*0xffffd0e8+exFilterBarTop+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
oColumns := oList:Columns()
oColumns:Add("Name"):Width := 96
oColumns:Add("Title"):Width := 96
oColumns:Add("City")
oItems := oList:Items()
h0 := oItems:Add("Nancy Davolio")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Andrew Fuller")
oItems:SetProperty("Caption",h0,1,"Vice President, Sales")
oItems:SetProperty("Caption",h0,2,"Tacoma")
oItems:SetProperty("SelectItem",h0,.T.)
h0 := oItems:Add("Janet Leverling")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Kirkland")
h0 := oItems:Add("Margaret Peacock")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"Redmond")
h0 := oItems:Add("Steven Buchanan")
oItems:SetProperty("Caption",h0,1,"Sales Manager")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Michael Suyama")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Robert King")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
h0 := oItems:Add("Laura Callahan")
oItems:SetProperty("Caption",h0,1,"Inside Sales Coordinator")
oItems:SetProperty("Caption",h0,2,"Seattle")
h0 := oItems:Add("Anne Dodsworth")
oItems:SetProperty("Caption",h0,1,"Sales Representative")
oItems:SetProperty("Caption",h0,2,"London")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
346
|
Is it possible to change the style for the vertical or horizontal grid lines, in the list area

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:DrawGridLines := -1/*exAllLines*/
oList:GridLineStyle := 33/*exGridLinesVSolid+exGridLinesHDot4*/
oList:Columns():Add("C1")
oList:Columns():Add("C2")
oList:Columns():Add("C3")
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:SetProperty("Caption",h,1,"SubItem 1.2")
oItems:SetProperty("Caption",h,2,"SubItem 1.3")
h := oItems:Add("Item 2")
oItems:SetProperty("Caption",h,1,"SubItem 2.2")
oItems:SetProperty("Caption",h,2,"SubItem 2.3")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
345
|
Is it possible to change the style for the grid lines, for instance to be solid not dotted

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:DrawGridLines := -1/*exAllLines*/
oList:GridLineStyle := 48/*exGridLinesSolid*/
oList:Columns():Add("Column")
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
344
|
How can I filter programatically using more columns

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn,oColumn1
LOCAL oColumns
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:MarkSearchColumn := .F.
oColumns := oList:Columns()
oColumns:Add("Car")
oColumns:Add("Equipment")
oItems := oList:Items()
oItems:SetProperty("Caption",oItems:Add("Mazda"),1,"Air Bag")
oItems:SetProperty("Caption",oItems:Add("Toyota"),1,"Air Bag,Air condition")
oItems:SetProperty("Caption",oItems:Add("Ford"),1,"Air condition")
oItems:SetProperty("Caption",oItems:Add("Nissan"),1,"Air Bag,ABS,ESP")
oItems:SetProperty("Caption",oItems:Add("Mazda"),1,"Air Bag, ABS,ESP")
oItems:SetProperty("Caption",oItems:Add("Mazda"),1,"ABS,ESP")
oColumn := oList:Columns:Item("Car")
oColumn:FilterType := 240/*exFilter*/
oColumn:Filter := "Mazda"
oColumn1 := oList:Columns:Item("Equipment")
oColumn1:FilterType := 3/*exPattern*/
oColumn1:Filter := "*ABS*|*ESP*"
oList:ApplyFilter()
oList:EndUpdate()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
343
|
How do I find an item based on my extra data

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Default")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:SetProperty("ItemData",oItems:Add("Item 3"),1234)
oItems:Add("Item 4")
oItems:SetProperty("ItemBold",oItems:FindItemData(1234),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
342
|
How do I print the control's content

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oPrint
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:BeginUpdate()
oList:Columns():Add("Number")
oList:Columns():Add("Currency"):ComputedField := "len(%0) ? currency(dbl(%0)) : ''"
oItems := oList:Items()
oItems:Add("1.23")
oItems:Add("2.34")
oItems:Add("0")
oItems:SetProperty("ItemBackColor",oItems:Add(),AutomationTranslateColor( GraMakeRGBColor ( { 255,128,128 } ) , .F. ))
oItems:Add("10000.99")
oList:EndUpdate()
oPrint := CreateObject("Exontrol.Print")
oPrint:PrintExt := oList
oPrint:Preview()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
341
|
How can I display the currency only for not empty cells
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Currency"):ComputedField := "len(%0) ? currency(dbl(%0)) : ''"
oItems := oList:Items()
oItems:Add("1.23")
oItems:Add("2.34")
oItems:Add("0")
oItems:SetProperty("ItemBackColor",oItems:Add(),AutomationTranslateColor( GraMakeRGBColor ( { 255,128,128 } ) , .F. ))
oItems:Add("10000.99")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
340
|
Is there a function to display the number of days between two date including the number of hours

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Start"):Width := 32
oList:Columns():Add("End")
oList:Columns():Add("Duration"):ComputedField := "2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : '') + =:3 + ' hour(s)' : '' )"
oItems := oList:Items()
h := oItems:Add("01/11/2001")
oItems:SetProperty("Caption",h,1,"01/14/2001")
h := oItems:Add("02/22/2002 12:00:00")
oItems:SetProperty("Caption",h,1,"03/14/2002 13:00:00")
h := oItems:Add("03/13/2003")
oItems:SetProperty("Caption",h,1,"04/11/2003 11:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
339
|
Is there a function to display the number of days between two date including the number of hours

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Start")
oList:Columns():Add("End")
oList:Columns():Add("Duration"):ComputedField := "" + CHR(34) + "D " + CHR(34) + " + int(date(%1)-date(%0)) + " + CHR(34) + " H " + CHR(34) + " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))"
oItems := oList:Items()
h := oItems:Add("01/11/2001")
oItems:SetProperty("Caption",h,1,"01/14/2001 23:00:00")
h := oItems:Add("02/22/2002 12:00:00")
oItems:SetProperty("Caption",h,1,"03/14/2002 13:00:00")
h := oItems:Add("03/13/2003")
oItems:SetProperty("Caption",h,1,"04/11/2003 11:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
338
|
How can I display the number of days between two dates

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Start")
oList:Columns():Add("End")
oList:Columns():Add("Duration"):ComputedField := "(date(%1)-date(%0)) + ' days'"
oItems := oList:Items()
h := oItems:Add("01/11/2001")
oItems:SetProperty("Caption",h,1,"01/14/2001")
h := oItems:Add("02/22/2002")
oItems:SetProperty("Caption",h,1,"03/14/2002")
h := oItems:Add("03/13/2003")
oItems:SetProperty("Caption",h,1,"04/11/2003")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
337
|
How can I get second part of the date

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Second"):ComputedField := "sec(date(%0))"
oItems := oList:Items()
oItems:Add("01/11/2001 10:10:00")
oItems:Add("02/22/2002 11:01:22")
oItems:Add("03/13/2003 12:23:01")
oItems:Add("04/14/2004 13:11:59")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
336
|
How can I get minute part of the date

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Minute"):ComputedField := "min(date(%0))"
oItems := oList:Items()
oItems:Add("01/11/2001 10:10:00")
oItems:Add("02/22/2002 11:01:00")
oItems:Add("03/13/2003 12:23:00")
oItems:Add("04/14/2004 13:11:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
335
|
How can I check the hour part only so I know it was afternoon

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ConditionalFormats():Add("hour(%0)>=12"):Bold := .T.
oList:Columns():Add("Date")
oList:Columns():Add("Hour"):ComputedField := "hour(%0)"
oItems := oList:Items()
oItems:Add("01/11/2001 10:00:00")
oItems:Add("02/22/2002 11:00:00")
oItems:Add("03/13/2003 12:00:00")
oItems:Add("04/14/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
334
|
What about a function to get the day in the week, or days since Sunday

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("WeekDay"):ComputedField := "weekday(%0)"
oItems := oList:Items()
oItems:Add("01/11/2001 10:00:00")
oItems:Add("02/22/2002 11:00:00")
oItems:Add("03/13/2003 12:00:00")
oItems:Add("04/14/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
333
|
Is there any function to get the day of the year or number of days since January 1st

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Day since January 1st"):ComputedField := "yearday(%0)"
oItems := oList:Items()
oItems:Add("01/11/2001 10:00:00")
oItems:Add("02/22/2002 11:00:00")
oItems:Add("03/13/2003 12:00:00")
oItems:Add("04/14/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
332
|
How can I display only the day of the date

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Day"):ComputedField := "day(%0)"
oItems := oList:Items()
oItems:Add("01/11/2001 10:00:00")
oItems:Add("02/22/2002 11:00:00")
oItems:Add("03/13/2003 12:00:00")
oItems:Add("04/14/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
331
|
How can I display only the month of the date

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Month"):ComputedField := "month(%0)"
oItems := oList:Items()
oItems:Add("01/01/2001 10:00:00")
oItems:Add("02/02/2002 11:00:00")
oItems:Add("03/03/2003 12:00:00")
oItems:Add("04/04/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
330
|
How can I get only the year part from a date expression

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Year"):ComputedField := "year(%0)"
oItems := oList:Items()
oItems:Add("01/01/2001 10:00:00")
oItems:Add("02/02/2002 11:00:00")
oItems:Add("03/03/2003 12:00:00")
oItems:Add("04/04/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
329
|
Can I convert the expression to date

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Date"):ComputedField := "date(dbl(%0))"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("30000.99")
oItems:Add("3561.23")
oItems:Add("1232.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
328
|
Can I convert the expression to a number, double or float

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Number + 2"):ComputedField := "dbl(%0)+2"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("0.99")
oItems:Add("1.23")
oItems:Add("2.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
327
|
How can I display dates in long format

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("LongFormat"):ComputedField := "longdate(%0)"
oItems := oList:Items()
oItems:Add("01/01/2001 10:00:00")
oItems:Add("02/02/2002 11:00:00")
oItems:Add("03/03/2003 12:00:00")
oItems:Add("04/04/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
326
|
How can I display dates in short format

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("ShortFormat"):ComputedField := "shortdate(%0)"
oItems := oList:Items()
oItems:Add("01/01/2001 10:00:00")
oItems:Add("02/02/2002 11:00:00")
oItems:Add("03/03/2003 12:00:00")
oItems:Add("04/04/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
325
|
How can I display the time only of a date expression

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Date")
oList:Columns():Add("Time"):ComputedField := "'time is:' + time(date(%0))"
oItems := oList:Items()
oItems:Add("01/01/2001 10:00:00")
oItems:Add("02/02/2002 11:00:00")
oItems:Add("03/03/2003 12:00:00")
oItems:Add("04/04/2004 13:00:00")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
324
|
Is there any function to display currencies, or money formatted as in the control panel

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Currency"):ComputedField := "currency(dbl(%0))"
oItems := oList:Items()
oItems:Add("1.23")
oItems:Add("2.34")
oItems:Add("10000.99")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
323
|
How can I convert the expression to a string so I can look into the date string expression for month's name

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Str"):ComputedField := "str(%0) + ' AA'"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("0.99")
oItems:Add("1.23")
oItems:Add("2.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
322
|
Can I display the absolute value or positive part of the number

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Abs"):ComputedField := "abs(%0)"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("0.99")
oItems:Add("1.23")
oItems:Add("2.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
321
|
Is there any function to get largest number with no fraction part that is not greater than the value

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Floor"):ComputedField := "floor(%0)"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("0.99")
oItems:Add("1.23")
oItems:Add("2.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
320
|
Is there any function to round the values base on the .5 value

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Round"):ComputedField := "round(%0)"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("0.99")
oItems:Add("1.23")
oItems:Add("2.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
319
|
How can I get or display the integer part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Number")
oList:Columns():Add("Int"):ComputedField := "int(%0)"
oItems := oList:Items()
oItems:Add("-1.98")
oItems:Add("0.99")
oItems:Add("1.23")
oItems:Add("2.34")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
318
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add(""):ComputedField := "proper(%0)"
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:Add("item item")
oItems:Add("item item")
oItems:Add("item item")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
317
|
Is there any option to display cells in uppercase

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add(""):ComputedField := "upper(%0)"
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oItems:Add("Item 4 - child")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
316
|
Is there any option to display cells in lowercase

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add(""):ComputedField := "lower(%0)"
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oItems:Add("Item 4 - child")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
315
|
How can I mark the cells that has a specified type, ie strings only

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ConditionalFormats():Add("type(%0) = 8"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oList:Columns():Add("")
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add(2)
oItems:Add("Item 4 - child")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
314
|
How can I bold the items that contains data or those who displays empty strings

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h,hC
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ConditionalFormats():Add("not len(%1)=0"):Bold := .T.
oList:Columns():Add("C1")
oList:Columns():Add("C2")
oItems := oList:Items()
h := oItems:Add("Item 1")
oItems:Add("Item 2")
hC := oItems:Add("Item 3")
oItems:SetProperty("Caption",hC,1,"1")
oItems:Add("Item 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
313
|
Can I change the background color for items or cells that contains a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ConditionalFormats():Add("%0 contains 'hi'"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oList:Columns():Add("")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oItems:Add("Item 4 - child")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
312
|
Is there any option to change the fore color for cells or items that ends with a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ConditionalFormats():Add("%0 endwith '22'"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oList:Columns():Add("")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 1.22")
oItems:Add("Item 2.22")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
311
|
How can I highlight the cells or items that starts with a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ConditionalFormats():Add("%0 startwith 'C'"):Underline := .T.
oList:Columns():Add("")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("CItem 2")
oItems:Add("Item 3")
oItems:Add("Item 4")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
310
|
How can I change the foreground color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumns := oList:Columns()
oColumns:Add("Column 1")
oColumns:Add("Column 2"):SetProperty("Def",8/*exHeaderForeColor*/,8439039)
oColumns:Add("Column 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
309
|
How can I change the background color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumns
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumns := oList:Columns()
oColumns:Add("Column 1")
oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,8439039)
oColumns:Add("Column 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
308
|
How can I display the column's header using multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:HeaderHeight := 128
oList:HeaderSingleLine := .F.
oList:Columns():Add("This is just a column that should break the header."):Width := 32
oList:Columns():Add("This is just another column that should break the header.")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
307
|
How can I align the text/caption on the scroll bar

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:SetProperty("ScrollPartCaption",1/*exHScroll*/,512/*exLowerBackPart*/,"left")
oList:SetProperty("ScrollPartCaptionAlignment",1/*exHScroll*/,512/*exLowerBackPart*/,0/*LeftAlignment*/)
oList:SetProperty("ScrollPartCaption",1/*exHScroll*/,128/*exUpperBackPart*/,"right")
oList:SetProperty("ScrollPartCaptionAlignment",1/*exHScroll*/,128/*exUpperBackPart*/,2/*RightAlignment*/)
oList:ColumnAutoResize := .F.
oList:Columns():Add(Transform(1,""))
oList:Columns():Add(Transform(2,""))
oList:Columns():Add(Transform(3,""))
oList:Columns():Add(Transform(4,""))
oList:Columns():Add(Transform(5,""))
oList:Columns():Add(Transform(6,""))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
306
|
How do I select the next row/item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Column")
oItems := oList:Items()
oItems:Add("Item 1")
oItems:Add("Item 2")
oItems:Add("Item 3")
oItems:SetProperty("SelectItem",oItems:NextVisibleItem(oItems:FocusItem()),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
305
|
How do I enable resizing ( changing the height ) the items at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ItemsAllowSizing := -1/*exResizeItem*/
oList:DrawGridLines := 1/*exHLines*/
oList:ScrollBySingleLine := .T.
oList:Columns():Add("Column")
oList:Items():Add("Item 1")
oItems := oList:Items()
oItems:SetProperty("ItemHeight",oItems:Add("Item 2"),48)
oList:Items():Add("Item 3")
oList:Items():Add("Item 4")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
304
|
How do I enable resizing all the items at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:ItemsAllowSizing := 1/*exResizeAllItems*/
oList:DrawGridLines := 1/*exHLines*/
oList:Columns():Add("Column")
oList:Items():Add("Item 1")
oItems := oList:Items()
oItems:SetProperty("ItemHeight",oItems:Add("Item 2"),48)
oList:Items():Add("Item 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
303
|
How can I remove the filter

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oColumn
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oColumn := oList:Columns():Add("Column")
oColumn:DisplayFilterButton := .T.
oColumn:FilterType := 1/*exBlanks*/
oList:ApplyFilter()
oList:ClearFilter()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
302
|
How do I change the control's border, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oList
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oList:Appearance := 16777216/*0x1000000+*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
301
|
Can I change the style for break or divider line

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oItems
LOCAL oList
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oList := XbpActiveXControl():new( oForm:drawingArea )
oList:CLSID := "Exontrol.List.1" /*{1B0CA5A8-2107-4460-BBEE-F25F8801B2F6}*/
oList:create(,, {10,60},{610,370} )
oList:Columns():Add("Default")
oItems := oList:Items()
oItems:Add("Item 1")
h := oItems:Add()
oItems:SetProperty("ItemBreak",h,2/*DoubleLine*/)
oItems:SetProperty("SelectableItem",h,.F.)
oItems:Add("Item 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|